/*import java.util.Comparator;

class Student{
    public int age;
    public Student(int age){
        this.age = age;
    }
}
class Compare1 implements Comparator<Student>{
    @Override
    public int compare(Student o1, Student o2){
        return o1.age - o2.age;
    }
}
public class Test {
    public static void main(String[] args){
        Student student1 = new Student(52);
        Student student2 = new Student(63);
        Compare1 compare1 = new Compare1();
        System.out.println(compare1.compare(student1, student2));
        String str1 = "hello";
        String str2 = "hell";
    }
}*/
import java.util.Arrays;
import java.util.Random;

public class Test{
    public static void testInsertTime(int[] array){
        Sort sort = new Sort();
        long startTime = System.currentTimeMillis();
        sort.insertSort(array);
        long endTime = System.currentTimeMillis();
        System.out.println("插入排序所用时间为:" + (endTime - startTime));
    }
    public static void orderData(int[] array){
        for(int i = 0; i < array.length; i++){
            array[i] = i;
        }
    }
    public static void disOrderData(int[] array){
        Random random = new Random();
        for(int i = 0; i < array.length; i++){
            array[i] = random.nextInt(10_0000);
        }
    }
    public static void main1(String[] args){
        int[] array = new int[10_0000];
        //orderData(array);
        //disOrderData(array);
        //testInsertTime(array);//插入排序

    }
    public static void main(String[] args){
        int[] array = {6,9,5,3,8,7,1,2,10};
        Sort sort = new Sort();
        sort.quickSort(array);
        System.out.println(Arrays.toString(array));
    }
}
















